package net.googlecode.demenkov.services;

import net.googlecode.demenkov.domains.Message;

/**
 * Service for actions with messages
 *
 * @author Demenkov Yura
 */
public interface MessageService {
    /**
     * Creates new messagee in database
     *
     * @param message that should be created in database
     */
    public void createMessage(Message message);

    /**
     * Gets message with messageId
     *
     * @param messageId of message
     * @return message if there is message with such id, or null if not
     */
    public Message getMessage(int messageId);

    /**
     * Deletes message from database
     *
     * @param message for deleting
     */
    public void deleteMessage(Message message);

    /**
     * Sets message read
     *
     * @param message for update
     */
    public void setReadMessage(Message message);
}
